<include file="./Application/Admin/View/default/Public/frontTeacher.html"/>
<style>
    .xinzeng {
        float: left;
        margin: 0 10px;
    }

    .topic {
        width: 100%;
        height: 40px;
        line-height: 40px;
        font-size: 20px;
        font-family: Arial;
        text-align: center;
        background: #e6e6e6;
        color: #666;
    }
    .layui-body{overflow-y: scroll;}
</style>
<div class="layui-body">
    <!-- 内容主体区域 -->
    <div class="topic">教学总工作量统计</div>
    <div style="height: 10px;"></div>
    <div id="workloadlistBody" style="padding: 10px;">
        <form class="layui-form">
            <div class="demoTable">
                快速查询：
                <div class="layui-inline">
                    <input class="layui-input" type="text" name="search" id="search" autocomplete="off"
                           placeholder="">
                </div>
                <div class="layui-btn" id="submit" lay-submit lay-filter="search">搜索</div>
            </div>
        </form>
        <table id="workload" lay-filter="workload"></table>
    </div>
</div>

<include file="./Application/Admin/View/default/Public/behind.html"/>

<script>
    
    layui.use(['table', 'jquery'], function () {
        var table = layui.table;
        var $ = layui.jquery;
        //监听工具条
        $('#submit').on('click', function () {
            var searchValue = $('#search').val();
            table.render({
                elem: '#workload'
                , url: '{:U("Workload/index")}' //数据接口
                , method: 'post'
                , where: {search: searchValue}
                , page: true //开启分页
                , limit: 10
                , cols: [[ //表头
//                    {type: 'checkbox', fixed: 'left'},
                    {field: 'teacher_id', title: '教师编号', width: "12%"},
                    {field: 'teacher_name', title: '教师姓名', width: "12%"},
                    {field: 'course_workload', title: '课程教学工作量', width: "12%"},
                    {field: 'practice_workload', title: '课程设计工作量', width: "12%"},
                    {field: 'project_workload', title: '毕业设计工作量', width: "12%"},
                    {field: 'workload', title: '总工作量', width: "10%"},
                    {field: 'term', title: '学年度', width: "15%"}
                ]]
            });
        });


        table.on('tool(workload)', function (obj) {
            var data = obj.data;
        });

        table.render({
            elem: '#workload'
            , url: '{:U("Workload/index")}' //数据接口
            , method: 'post'
            , page: true //开启分页
            , limit: 10
            , cols: [[ //表头
//                {type: 'checkbox', fixed: 'left'},
                {field: 'teacher_id', title: '教师编号', width: "12%"},
                {field: 'teacher_name', title: '教师姓名', width: "12%"},
                {field: 'course_workload', title: '课程教学工作量', width: "12%"},
                {field: 'practice_workload', title: '课程设计工作量', width: "12%"},
                {field: 'project_workload', title: '毕业设计工作量', width: "12%"},
                {field: 'workload', title: '总工作量', width: "10%"},
                {field: 'term', title: '学年度', width: "15%"}
            ]]
        });

    });

</script>


